package com.lms.provider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 李孟帅
 * @CreateTime: 2020-01-04 13:39
 * @Description: ${Description}
 */
@RestController
@RefreshScope
public class ProviderController {

    @Value("${spring.application.name}")
    public String applicationName;
    @Value("${server.port}")
    public Integer port;

    @RequestMapping(value = "/getInfo")
    public String getInfo() {
        String info = "application name:" + applicationName + "\nport:" + port;
        System.out.println(info);
        return info;
    }




}
